package example;

public enum Enum {
    ZHANGSAN(new Bulider().buildName("张三"));
    private String name;

    private Integer age;

    private Enum(Bulider bulider){
        this.name=bulider.name;
        this.age=bulider.age;
    }

    public static  final class Bulider{
        private String name;

        private Integer age;

        public Enum build(){
            return ZHANGSAN;
        }

        public Bulider buildName(String name){
            this.name=name;
            return this;
        }

        public Bulider buildAge(Integer age){
            this.age=age;
            return this;
        }
    }


}
